package base

import (
	_ "github.com/go-sql-driver/mysql" // 导入 MySQL 驱动
	"xorm.io/xorm"
)

func InitEngine() (*xorm.Engine, error) {
	engine, err := xorm.NewEngine("mysql", "root:fan@1988fan@1988fan@1988fan@1988@tcp(127.0.0.1:3306)/gdbc?charset=utf8")
	if err != nil {
		return nil, err
	}
	return engine, nil
}
